feat: make model generation budgets configurable - #37
Open
minixalpha wants to merge 5 commits into
Open
Conversation
minixalpha
marked this pull request as ready for review
September 10, 2026 12:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replies previously used a fixed 8192-token generation cap. Add
--max-tokensandANTHROPIC_MAX_TOKENSwith CLI > environment > user settings > default precedence, and raise the default to 32768. Interactive and headless runs use the resolved limit on every request; invalid effective values fail before a model call.Harbor forwards explicit budgets and environment settings. Startup output, Event Journals, and ATIF record the effective cap separately from usage, while older journals still replay. Existing truncation handling is preserved. Bilingual user documentation and development notes cover configuration, first-party research into benchmark settings and agent defaults, and the complete experiment record.
Validation:
2b9166551275ae20e81edf7fd52d26b44344ea81.7a610cbf87ee3ac27f8cdb8a4329076f210dee8dwithout CLI/environment budget overrides. The initial runs retain native 900-second task deadlines; the separate diagnostic runs below extend the allowance and capture complete evidence.regex-logresponse_truncatedwrite-compressorresponse_truncatedBoth retries extend only the installation window from 360 to 1080 seconds. All initial failures are retained. There were three model-executing, scored runs, all reward 0, plus one installation failure. Neither timed-out retry produced final ATIF, leaving token totals, final stop reasons, and costs unknown. The interrupted compressor run has only a known first-reply cost subtotal.
On 09-10, a separate diagnostic
regex-logrun increased agent execution allowance to 3600 seconds and persisted an unshortened Journal, complete decoded response streams, chunk timing, and stack snapshots. Harbor received an outer 3780-second allowance for finalization; installation remained at 1080 seconds. The task passed (reward 1.0, official verifier 1 passed) in 580.4 seconds of agent execution, within the original 900-second deadline.The first reply took 502.4 seconds, with sustained thinking output and a longest nonempty-delta gap of 3.4 seconds. All five replies completed without truncation; six tools took 0.023 seconds total. Complete usage is 74650 prompt tokens (including 53504 cached), 17264 completion tokens, and $0.005338074. Native ATIF validates and exactly matches all 147 untruncated Journal entries. The passive diagnostic wrapper passed normal, stalled, and forcibly terminated offline scenarios; it is retained with the local experiment scripts, without production instrumentation changes.
This run identifies sustained model thinking as its main delay, but does not reproduce or determine the exact cause of the historical timeout. It did not use the extra deadline allowance, so its success cannot be attributed to extending that deadline. Previous container dependency versions were not recorded; identical agent wheels do not establish identical runtime or backend conditions. All prior failures remain intact.
On 09-11,
write-compressorrepeated the same diagnostic method, retaining the wheel and byte-identical recorder. It failed (reward 0, three official tests failed becausedata.compwas absent) after 1449.1 seconds of agent execution. Its second reply took 1414.2 seconds and ended withmax_tokens: 32768 output tokens, including 32767 provider-reported thinking tokens, with no visible text or tool arguments. Two local tools took only 0.004 seconds. At a read-only checkpoint at 900.4 seconds, the file was already confirmed absent while the second reply continued streaming; the longest generation-delta gap was 2.2 seconds.The native outcome is
response_truncated, without a deadline event or forced kill. All 13 Journal entries are unshortened, including 116281 thinking characters; native ATIF validates and exactly matches the Journal. Complete usage is 3926 prompt tokens, zero cached tokens, 32886 completion tokens, and $0.00615504. Both generation costs were resolved. This run directly demonstrates sustained thinking outlasting the original deadline and then exhausting the generation budget without delivering the file. Extending the deadline alone did not solve it; this does not retroactively establish the cause of the earlier untraced timeout or server interruption. The new container installed Anthropic SDK 1.5.0, versus 1.4.0 in the regex diagnostic, so resolved dependencies are explicitly recorded as another comparison limit.32768 remains the requested experimental default. The successful regex diagnostic and failed compressor diagnostic do not establish benchmark-wide improvement. See the development notes for timings, accounting limits, source identity, and local artifact locations. Full diagnostic artifacts remain under Git-ignored
jobs/and have not been uploaded.English user documentation and development notes are synchronized with the Chinese sources. No research-note source files under
docs/research/changed.